/* 支付页面样式 - 基于vite.config.js中的postcss-pxtorem配置 (rootValue: 75) */

.paymentContainer {
  width: 100%;
  max-width: 750px;  /* 对应10rem，根据rootValue: 75 */
  margin: 0 auto;
  padding: 0 0 100px 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f7fa;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  color: #333;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #1677ff; /* 支付宝蓝色 */
  padding: 25px 20px;
  color: white;
  position: relative;
}

.backButton {
  background-color: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  z-index: 2;
  margin-right: 10px;
}

.backButton:active {
  opacity: 0.8;
}

.title {
  font-size: 36px;
  margin: 0;
  font-weight: 500;
  flex-grow: 1;
  text-align: center;
  position: relative;
  padding-left: 20px;
  padding-right: 20px;
}

.headerRight {
  display: flex;
  align-items: center;
}

.helpButton {
  background-color: transparent;
  border: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 50%;
}

.helpIcon {
  font-size: 36px;
  font-style: normal;
}

/* 订单信息区域 */
.orderInfo {
  background-color: white;
  padding: 30px 25px;
  margin-bottom: 20px;
}

.orderTitle {
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 25px;
}

.customerInfo {
  padding: 20px 0;
  border-top: 1px solid #f0f0f0;
}

.infoItem {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 28px;
}

.label {
  color: #666;
}

.value {
  color: #333;
}

/* 支付方式选择 */
.paymentMethods {
  background-color: white;
  padding: 20px 25px;
  margin-bottom: 20px;
}

.sectionTitle {
  font-size: 28px;
  color: #333;
  margin: 0 0 20px 0;
  font-weight: normal;
}

.methodOptions {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.methodOption {
  flex: 1;
  padding: 20px;
  border: 2px solid #e8e8e8;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.methodOption.selected {
  border-color: #1677ff; /* 支付宝蓝色 */
  background-color: rgba(22, 119, 255, 0.05);
}

.methodIcon {
  font-size: 36px;
  margin-bottom: 10px;
}

.methodName {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
}

.methodDesc {
  font-size: 24px;
  color: #999;
  text-align: center;
}

/* 价格明细 */
.priceDetails {
  background-color: white;
  padding: 20px 25px;
  margin-bottom: 20px;
}

.priceItem {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 28px;
}

.itemName {
  color: #333;
}

.itemPrice {
  color: #ff4d4f;
  font-weight: 500;
}

/* 底部合计与支付按钮 */
.totalSection {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  max-width: 750px;
  margin: 0 auto;
  box-sizing: border-box;
}

.totalPrice {
  display: flex;
  align-items: center;
  font-size: 28px;
}

.totalAmount {
  font-size: 34px;
  color: #ff4d4f;
  font-weight: bold;
  margin-left: 10px;
}

.paymentButton {
  background-color: #1677ff; /* 支付宝蓝色 */
  color: white;
  border: none;
  padding: 20px 50px;
  border-radius: 30px;
  font-size: 30px;
  font-weight: 500;
  cursor: pointer;
}

.paymentButton:active {
  background-color: #0e5ecf; /* 深一点的蓝色 */
}

/* 加载状态样式 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 0;
  color: #666;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(22, 119, 255, 0.1);
  border-radius: 50%;
  border-top-color: #1677ff; /* 支付宝蓝色 */
  animation: spin 1s linear infinite;
  margin-bottom: 30px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  font-size: 30px;
  color: #666;
}

/* 错误提示样式 */
.errorContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 25px;
  text-align: center;
}

.errorIcon {
  font-size: 50px;
  margin-bottom: 20px;
  color: #ff4d4f;
}

.errorMessage {
  font-size: 30px;
  color: #333;
  margin-bottom: 15px;
}

.errorDetail {
  font-size: 26px;
  color: #999;
  margin-bottom: 30px;
}

/* 调试信息样式 */
.rawDataSection {
  width: 100%;
  margin: 20px 0 30px;
  text-align: left;
}

.rawDataSection h4 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}

.rawDataDisplay {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  overflow-x: auto;
  font-family: monospace;
  font-size: 20px;
  line-height: 1.5;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

.retryButton {
  background-color: #1677ff; /* 支付宝蓝色 */
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 28px;
  cursor: pointer;
}

.retryButton:active {
  background-color: #0e5ecf; /* 深一点的蓝色 */
}

/* 选择入住天数相关样式 */
.nightsSelector {
  background-color: white;
  padding: 20px 25px;
  margin-bottom: 20px;
}

.nightsControl {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
}

.nightsButton {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #f5f5f5;
  border: 2px solid #e8e8e8;
  font-size: 36px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.nightsButton:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.nightsButton:active:not(:disabled) {
  background-color: #e0e0e0;
  transform: scale(0.95);
}

.nightsDisplay {
  margin: 0 30px;
  text-align: center;
}

.nightsCount {
  font-size: 48px;
  font-weight: bold;
  color: #1677ff;
}

.nightsLabel {
  font-size: 30px;
  margin-left: 8px;
  color: #666;
}

.nightsInfo {
  text-align: center;
  font-size: 24px;
  color: #999;
  margin-top: 10px;
}

/* 响应式调整 */
@media screen and (max-width: 375px) {
  .title {
    font-size: 28px;
  }

  .backButton {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .orderTitle {
    font-size: 26px;
  }
  
  .infoItem, .methodName, .priceItem {
    font-size: 26px;
  }
  
  .methodDesc {
    font-size: 22px;
  }
  
  .paymentButton {
    padding: 15px 40px;
    font-size: 28px;
  }

  .errorMessage {
    font-size: 26px;
  }

  .errorDetail {
    font-size: 22px;
  }

  .retryButton {
    padding: 12px 30px;
    font-size: 24px;
  }
  
  .nightsButton {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }
  
  .nightsCount {
    font-size: 40px;
  }
  
  .nightsLabel {
    font-size: 24px;
  }
} 